package com.vibration.socket.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

public class TcpDataItem implements Serializable {

    private DataList dataList;
    private Map<String,double[]> hvData;
    private int gpstTowms = 0; //GPS 时间毫秒时间部分
    private int gpstWeekNum = 0; //GPS 时间周数时间部分
    private double latitudeVal; //纬度
    private double longitudeVal; //经度
    private String ip; //IP 地址
    private int clockDrift = 0; //时钟偏移
    private int sn = 0; //9 位数设备识别号
    private int freeMemory = 0; //当前 tf 卡剩余可用内存 单位 kb
    private int gpsState = 0; //gps 4 种状态： 0：关闭 ，1：GPS 开启， 2: 2D（平面地图锁定） ，3： 3D（立体地图锁定）
    private int satelliteNum =0; //当前搜索到的卫星数 GPS 关闭时，当前卫星数量为零
    private int dataType = 0; //数据类型，固定值： 0x02
    private float temperature = 0; //设备当前温度
    private float voltage = 0; ////设备当前电压值 单位 V
    private float sampleInterval = 0; //采样间隔 单位 ms
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dataTime;

    public DataList getDataList() {
        return dataList;
    }

    public void setDataList(DataList dataList) {
        this.dataList = dataList;
    }

    public Map<String, double[]> getHvData() {
        return hvData;
    }

    public void setHvData(Map<String, double[]> hvData) {
        this.hvData = hvData;
    }

    public int getGpstTowms() {
        return gpstTowms;
    }

    public void setGpstTowms(int gpstTowms) {
        this.gpstTowms = gpstTowms;
    }

    public int getGpstWeekNum() {
        return gpstWeekNum;
    }

    public void setGpstWeekNum(int gpstWeekNum) {
        this.gpstWeekNum = gpstWeekNum;
    }

    public double getLatitudeVal() {
        return latitudeVal;
    }

    public void setLatitudeVal(double latitudeVal) {
        this.latitudeVal = latitudeVal;
    }

    public double getLongitudeVal() {
        return longitudeVal;
    }

    public void setLongitudeVal(double longitudeVal) {
        this.longitudeVal = longitudeVal;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getClockDrift() {
        return clockDrift;
    }

    public void setClockDrift(int clockDrift) {
        this.clockDrift = clockDrift;
    }

    public int getSn() {
        return sn;
    }

    public void setSn(int sn) {
        this.sn = sn;
    }

    public int getFreeMemory() {
        return freeMemory;
    }

    public void setFreeMemory(int freeMemory) {
        this.freeMemory = freeMemory;
    }

    public int getGpsState() {
        return gpsState;
    }

    public void setGpsState(int gpsState) {
        this.gpsState = gpsState;
    }

    public int getSatelliteNum() {
        return satelliteNum;
    }

    public void setSatelliteNum(int satelliteNum) {
        this.satelliteNum = satelliteNum;
    }

    public int getDataType() {
        return dataType;
    }

    public void setDataType(int dataType) {
        this.dataType = dataType;
    }

    public float getTemperature() {
        return temperature;
    }

    public void setTemperature(float temperature) {
        this.temperature = temperature;
    }

    public float getVoltage() {
        return voltage;
    }

    public void setVoltage(float voltage) {
        this.voltage = voltage;
    }

    public float getSampleInterval() {
        return sampleInterval;
    }

    public void setSampleInterval(float sampleInterval) {
        this.sampleInterval = sampleInterval;
    }

    public Date getDataTime() {
        return dataTime;
    }

    public void setDataTime(Date dataTime) {
        this.dataTime = dataTime;
    }

    @Override
    public String toString() {
        return "TcpDataItem{" +
                "dataList=" + dataList +
                ", gpstTowms=" + gpstTowms +
                ", gpstWeekNum=" + gpstWeekNum +
                ", latitudeVal=" + latitudeVal +
                ", longitudeVal=" + longitudeVal +
                ", ip='" + ip + '\'' +
                ", clockDrift=" + clockDrift +
                ", sn=" + sn +
                ", freeMemory=" + freeMemory +
                ", gpsState=" + gpsState +
                ", satelliteNum=" + satelliteNum +
                ", dataType=" + dataType +
                ", temperature=" + temperature +
                ", voltage=" + voltage +
                ", sampleInterval=" + sampleInterval +
                ", dataTime=" + dataTime +
                '}';
    }
}
